package com.gzgy.ustore.api.service.impl;

import com.gzgy.ustore.api.model.AdvertListModel;
import com.gzgy.ustore.api.service.AdvertService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yimi on 2017/7/3.
 */
@Service
public class AdvertServiceImpl implements AdvertService {
    @Override
    public List<AdvertListModel> advertList() {


        AdvertListModel advertListModel1 = new AdvertListModel();
        advertListModel1.setAdCode("编号456");
        advertListModel1.setIamgePath("http://192.168.0.10/advert/image2.jpg");
        advertListModel1.setTitle("广告456");
        advertListModel1.setUrl("http://www.baidu.com");

        AdvertListModel advertListModel2 = new AdvertListModel();
        advertListModel2.setAdCode("编号4563");
        advertListModel2.setIamgePath("http://192.168.0.10/advert/123.png");
        advertListModel2.setTitle("广告4356");
        advertListModel2.setUrl("http://www.baidu.com");


        List<AdvertListModel> advertListModelList = new ArrayList<AdvertListModel>();
        advertListModelList.add(advertListModel1);
        advertListModelList.add(advertListModel2);
        return advertListModelList;
    }
}
